package com.lab02.spring.firstpage.services;

import com.lab02.spring.firstpage.models.Player;
import com.lab02.spring.firstpage.persistence.PlayerDao;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: bsceran
 * Date: 5/23/13
 * Time: 2:31 PM
 * To change this template use File | Settings | File Templates.
 */
public class PlayerServiceImpl implements  PlayerService {
    private PlayerDao playerDao;

    public void setPlayerDao(PlayerDao playerDao) {
        this.playerDao = playerDao;
    }

    @Override
    public void add(Player player) {
        playerDao.add(player);
    }

    @Override
    public void remove(String playerName) {
        playerDao.remove(playerName);
    }

    @Override
    public List<Player> list() {
        return playerDao.list();
    }
}
